﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<Model.Models.ItemModel>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    ListarPedidos
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        Histórico de Pedidos</h2>
    <table>
        <tr>
            <th>
                Empresa
            </th>
            <th>
                descricao
            </th>
            <th>
                valor
            </th>
            <th>
                quantidade
            </th>
            <th>
                Data
            </th>
        </tr>
        <% foreach (var item in Model)
           { %>
        <tr>
            <td>
                <%: Html.DisplayFor(modelItem => item.NomeEmpresa)%>
            </td>
            <td>
                <%: Html.DisplayFor(modelItem => item.descricao) %>
            </td>
            <td>
                <%: Html.DisplayFor(modelItem => item.valor) %>
            </td>
            <td>
                <%: Html.DisplayFor(modelItem => item.quantidade) %>
            </td>
            <td>
                <%: Html.DisplayFor(modelItem => item.DataPedido)%>
            </td>
        </tr>
        <% } %>
    </table>
       <input type="button" value="Voltar" class="button dark" onclick="location.href='<%: Url.Action("ListarEmpresas", "Cliente") %>'" />
</asp:Content>
